package com.yj.springbootstudy.algorithm.array;

import java.util.Arrays;

public class Demo01 {

    public static void main(String[] args) {
        Integer [] arr1 = {1, 2, 3, 4, 5};
        Integer [] ts = Arrays.copyOf(arr1, 5, Integer[].class);

        System.out.println(Arrays.toString(ts));


        Integer [] arr2 = {2,3,4,5,6};
        Integer [] arr3 = new Integer[5];

        System.arraycopy(arr2,0,arr3,0,arr2.length);
        System.out.println(Arrays.toString(arr3));
    }
}
